<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/top.css" />
<link rel="stylesheet" href="css/home.css" />
<link rel="stylesheet" href="font-awesome-4.6.3/css/font-awesome.min.css" />
<script src="js/jquery.min.js"></script>
<script src="js/top.js"></script>
<script src="js/home.js"></script>
<script src="js/echarts.min.js"></script>
<script src="js/the-charts.js"></script>
<title>智行校园</title>
</head>
<body>
    <input type="hidden" value="我的主页"  />
	<div class="container">
		<div class="lcontainer">
			<div class="ltcontainer" style="border:0">
			  <h3 style="text-align:left;margin:0;display:inline-block;float:left">学习计划</h3>
			  <select id="study_select" style="display:inline-block;margin-left: 1em;float:left;padding: 0.3em;"></select>
			  <a href="html/home_study.jsp" style="float:right;text-decoration:none;padding-top:0.5em;">查看全部</a>
			  <div id="my_study_plan" style="width:100%;height:19em;border:0;margin-top:-0.5em"></div>
			</div>
			<h3>我的数据报告</h3>
			<div class="lbcontainer">
				<div class="class"></div>
				<div class="score"></div>
				<div class="roll_call"></div>
				<div class="book"></div>
				<div class="cost"></div>
			</div>
		</div>
		<div class="rcontainer">
			<div class="rtcontainer">
				<div></div>
				<div class="right_date"></div>
			</div>
			<div class="rccontainer">
				<label>消息 </label> <a class="search_info" href="#">查看更多</a>
				<div class="message_scroll"></div>
			</div>
			<div class="rbcontainer">
				<h3>今日课程</h3>
				<a class="search_info" href="#">查看本周课程</a>
				<table class="my_table" cellspacing="0" cellpadding="0">
					<thead>
						<tr>
							<td>课程</td>
							<td>地点</td>
							<td>时间</td>
						</tr>
					</thead>
					<tbody></tbody>
				</table>
			</div>
		</div>
		<div class="clear"></div>
	</div>

	<footer>
	<div class="footer_left" style="height: 4.5em"></div>
	<div class=" footer_right" style="height: 4.5em">
		<div class="left_div">
			<button id="footer_toggle" class="footer_up"></button>
			<!--  <a class=" footer_reset" href="#"><img  src="img/reset.png" /></a> -->
		</div>
		<div class="right_div">
			<label><img class="footer_scan" src="img/erweima.png" />智行校园APP</label>
			<label class="change"><font size="4">智行校园APP</font></br>我最忠实的好友 <img
				src="img/erweima.png" /></label>
		</div>

	</div>
	</footer>
	<div id="myFunction">
		<div class="dialog"></div>
		<div class="my_dialog">
			<h3 class="function_header">管理我的应用
			   <i class="fa fa-times" style="float:right;margin-right:1em;cursor:pointer;margin-top:0.4em"></i></h3>
			<button class="function_finish">提交</button>
			<div class="dialog_content">
				<div class="my_function"></div>
				<div class="other_function"></div>
			</div>
		</div>
	</div>
	<div id="myClass">
		<div class="dialog"></div>
		<div class="my_dialog">
			<h3></h3>
			<select ></select><img src="img/close.png" />
			<table class="my_table" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<td>时间</td>
						<td>周一</td>
						<td>周二</td>
						<td>周三</td>
						<td>周四</td>
						<td>周五</td>
						<td>周六</td>
						<td>周日</td>
					</tr>
				</thead>
				<tbody></tbody>
			</table>
			<button>关闭</button>
		</div>
	</div>
	<script>
	var user_id='';
	
	 $.ajax({
		 url : 'jsp/study_select.json',
		 data:{param1:user_id},
		 type : 'post'
	  }).done(
			function(data) {
				for(var m=0;m<data.list.length;m++){
					if(data.now[0].xn==data.list[m].xn&&data.now[0].xq==data.list[m].xq){
						paint_bar({param1:user_id,param2:data.now[0].xn,param3:data.now[0].xq});
						$('select#study_select').append('<option value="'+data.list[m].xn+'" xq="'+data.list[m].xq+'" selected="selected">'+data.list[m].info+'</option>');   
					}
					else
				        $('select#study_select').append('<option value="'+data.list[m].xn+'" xq="'+data.list[m].xq+'">'+data.list[m].info+'</option>');
				 
			   }
				$('select#study_select').change(function(){
				//	$('#my_study_plan').empty();
					paint_bar({param1:user_id,param2:$(this).find('option:selected').attr('value'),param3:$(this).find('option:selected').attr('xq')});
				  });
			});
	function paint_bar(param){
		$.ajax({
			url : 'jsp/study_bar.json',
			data:param,
			type : 'post'
		}).done(
				function(data) {
					var c = echarts.init($('#my_study_plan')[0], 'macarons');
					c.hideLoading();
					var option = Config('学习目标（'+param.param2+'学年）',false,'bar').option6(data);
					c.setOption(option, true);
					$(window).resize(function() {
						c.resize();
						c.setOption(option);
					});
				});
	}
	</script>
</body>
</html>